<?php
class VehiculosView extends CustomView
{

    public function verVehiculos($vars = array())
    {
        $this->top();
        $this->setTemplate('ver');
        $vars['pagination'] = $this->buildPagination($vars['pagination_link'], $vars['vehiculos']);
        $this->parse('ver', $vars);
        {
            if (!empty($vars['vehiculos']['results']))
            {
                foreach ($vars['vehiculos']['results'] as $vehiculo)
                {
                    $this->parse('vehiculo', $vehiculo);
                }
            }
			else
			{
				$this->parse('sin_resultados');
			}
        }
        $this->parse('ver', $vars);
        $this->bottom();
    }

    public function nuevoVehiculo($vars = array())
    {
        $this->top();
        $this->setTemplate('nuevo');
        $this->parse('nuevo', $vars);
        $this->bottom();
    }

    public function editarVehiculo($vars = array())
    {
        $this->top();
        $this->setTemplate('editar');
        $this->parse('editar', $vars);
        $this->bottom();
    }
}
?>